﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DsLib
{
    #region BSTUtils
    public static class BSTUtils
    {
        public static BinarySearchTree<T> GetABuiltBST<T>(IEnumerable<T> valuesToAdd) where T : IComparable<T>
        {
            BinarySearchTree<T> tree = new BinarySearchTree<T>();

            foreach (T i in valuesToAdd)
            {
                tree.Add(i);
            }

            return tree;
        }
    }
    #endregion
}
